import TYPES from '../../action/types'

const defaultState = {
    user: 'mxl'
}
export default function onAction(state = defaultState, action) {
    switch (action.type) {
        case TYPES.CHANGE:
            return {
                ...state,
                user: action.user
            }
        default:
            return state;
    }
}